package com.demo.library.Dao;


import com.demo.library.entity.Book;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BookRepository extends JpaRepository<Book, Long> {

    List<Book> findByTitleContains(String title);

    @Query(value = "select authorInfo from book",nativeQuery = true)
    List<String> getAuthorList();
}
